@tailwind base;
@tailwind components;
@tailwind utilities;

/* Markdown 基础样式 */
.markdown-renderer {
  width: 100%;
  overflow-x: hidden;
}

/* 代码块样式 */
.markdown-renderer pre {
  overflow-x: auto;
  border-radius: 0.375rem;
  margin: 1rem 0;
}

/* 代码复制按钮 */
.markdown-renderer .copy-button {
  background-color: rgba(55, 65, 81, 0.5);
  color: #f3f4f6;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.markdown-renderer .copy-button:hover {
  background-color: rgba(55, 65, 81, 0.8);
}

/* 表格样式 */
.markdown-renderer table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
}

.markdown-renderer th {
  background-color: #f8fafc;
  color: #1e293b;
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}

.markdown-renderer td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

/* 暗黑模式样式 */
.dark .markdown-renderer th {
  background-color: #1e293b;
  color: #f1f5f9;
  border-bottom-color: #334155;
}

.dark .markdown-renderer td {
  border-bottom-color: #334155;
}

/* 链接样式 */
.markdown-renderer a {
  color: #2563eb;
  text-decoration: none;
}

.markdown-renderer a:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.dark .markdown-renderer a {
  color: #3b82f6;
}

.dark .markdown-renderer a:hover {
  color: #60a5fa;
}

/* 引用块样式 */
.markdown-renderer blockquote {
  border-left: 4px solid #d1d5db;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #4b5563;
  font-style: italic;
}

.dark .markdown-renderer blockquote {
  border-left-color: #4b5563;
  color: #9ca3af;
}

/* 其他样式会通过TailwindCSS的JIT编译自动提取 */
